﻿<div class="finder-scope">
	<div class="moveable">
		<div>
			<button aria-hidden="true" class="close" type="button" ng-click="$hide()">×</button>
			<a class="thumbnail">
				<img ng-src="{{scopePlace.get_thumbnailUrl()||scopePlace.imageSet.get_thumbnailUrl()}}" />
			</a>
			<h4><strong localize="Classification"></strong>: <span>{{getClassificationText(scopePlace.get_classification())}}</span></h4>
			<h4 ng-if="!scopePlace.isSurvey"><strong localize="Constellation"></strong>: <span>{{constellations.fullNames[scopePlace.get_constellation()]}}</span></h4>
			<h4><strong localize="Names"></strong>: <span>{{scopePlace.get_names()?scopePlace.get_names().join(', '): scopePlace.get_name()}}</span></h4>
			<hr />
			<div style="width:48%;display:inline-block" ng-if="!scopePlace.isSurvey">
				<p><label localize="RA"></label>: <span>{{formatHms(scopePlace.get_RA(), true, false, false, 1)}}</span></p>
				<p><label localize="Dec"></label>: <span>{{formatHms(scopePlace.get_dec(), false, true, true)}}</span></p>
				<p><label localize="Alt"></label>: <span>{{formatHms(scopePlace.altAz.get_alt(), false, false, true)}}</span></p>
				<p><label localize="Az"></label>: <span>{{formatHms(scopePlace.altAz.get_az(), false, false, true)}}</span></p>
			</div>
			<div style="width:48%;display:inline-block;margin-left:1%">
				<!--<p><label localize="Distance"></label>: <span>{{scopePlace.get_distance() == 0 ? loc.na : UITools.formatDistance(scopePlace.get_distance())}}</span></p>
				<p><label localize="Mag"></label>: <span>{{scopePlace.get_magnitude() == 0 ? loc.na : scopePlace.get_magnitude().toFixed(2)}}</span></p>-->
				<p>
					<label localize="Rise"></label>: <span>
						{{scopePlace.riseSet ? scopePlace.riseSet.bNeverRises ? loc.neverRises : formatDecimalHours(scopePlace.riseSet.rise, false, false, true) : loc.na}}
					</span>
				</p>
				<p><label localize="Transit"></label>:  <span>{{scopePlace.riseSet ? formatDecimalHours(scopePlace.riseSet.transit, false, false, true) : loc.na }}</span></p>
				<p><label localize="Set"></label>: <span>{{scopePlace.riseSet ? scopePlace.riseSet.bNeverSets? loc.neverSets : formatDecimalHours(scopePlace.riseSet.set, false, false, true) : loc.na}}</span></p>
			</div>
			<h5 style="margin-bottom:5px;margin-top:5px" localize="Image Credit">Image Credit:</h5>
			<p style="max-height:35px;overflow:hidden" title="{{getCreditsText(scopePlace)}}">
				<a href="{{getCreditsUrl(scopePlace)}}" target="_blank">{{getCreditsText(scopePlace)}}</a>
			</p>

			<div class="buttons">

				<div class="dropup" style="display: inline-block">

					<a class="btn" data-toggle="dropdown" role="button">
						<span localize="Research"></span>
						<i class="fa fa-caret-down" style="font-size:12px"></i>
					</a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="javascript:void(0)"><span localize="Name"></span>: {{scopePlace.get_name()}}</a></li>
						<li class="dropdown-submenu">
							<a href="javascript:void(0)" localize="Information"></a>
							<ul class="dropdown-menu" style="height:126px"> <!-- 28px per item + 2*7px top/bottom padding -->
								<li><a href="//wikipedia.org/wiki/Special:Search?search={{scopePlaceNameForQueryString}}" target="wikipedia" localize="Look up on Wikipedia"></a></li>
								<li><a href="//ui.adsabs.harvard.edu/search/q=object:%22{{scopePlaceNameForQueryString}}%22" target="ads" localize="Look up on SAO/NASA ADS"></a></li>
								<li><a href="//simbad.u-strasbg.fr/simbad/sim-id?Ident={{scopePlaceNameForQueryString}}" target="simbad" localize="Look up on SIMBAD"></a></li>
								<li><a href="//ned.ipac.caltech.edu/cgi-bin/nph-imgdata?objname={{scopePlaceNameForQueryString}}" target="ned" localize="Look up on NED"></a></li>
							</ul>
						</li>
						<li class="dropdown-submenu">
							<a href="javascript:void(0)" localize="Imagery"></a>
							<ul class="dropdown-menu" style="height:67px;">
								<li>
									<a href="javascript:void(0)" localize="Get DSS Image"></a>
								</li>
								<li>
									<a href="javascript:void(0)" localize="Get SDSS Image"></a>
								</li>
							</ul>
						</li>
            <li>
              <a href="http://sky.esa.int/?action=goto&target={{scopePlace.get_RA()*15}}%20{{scopePlace.get_dec()}}&hips=DSS2%20color&fov={{viewport.Fov}}&cooframe=J2000&sci=true" target="esasky"><span localize="View in ESASky"></span></a>
            </li>
						<li role="presentation" class="divider"></li>
						<li><a ng-click="setBackgroundImage(scopePlace)" href="javascript:void(0)" localize="Set as Background Imagery"></a></li>
						<li><a ng-click="setForegroundImage(scopePlace)" href="javascript:void(0)" localize="Set as Foreground Imagery"></a></li>

					</ul>
				</div>
				<a ng-if="!scopePlace.isSurvey && !scopePlace.isExploreTab" class="btn" ng-click="showObject(scopePlace)" localize="Show Object"></a>
				<a class="btn" href="//www.bing.com/search?q={{scopePlace.get_name().split(' ').join('+')}}" target="bing">
					<img ng-src="{{staticAssetsPrefix}}images/bing-search-button.png" style="margin-top: -2px" />
					<i class="fa fa-search"></i>
				</a>
			</div>
		</div>
	</div>
</div>
